﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Xml;

namespace XhPaper
{
    public class MyXmlTabledyMini : MyXmlDyHuan
    {
        public override void GetDataFromXml()
        {
            base.GetDataFromXml();
            XmlNodeList nodeList2;
            #region 得到dywide
            nodeList2 = XmlRoot.SelectNodes("dy");
            double w, h;
            if (nodeList2.Count > 0)
            {
                double.TryParse(nodeList2.Item(0).Attributes["w"].Value, out w);
                double.TryParse(nodeList2.Item(0).Attributes["h"].Value, out h);
                Width = w;
                Heigh = h;
            }
            #endregion
        }
        public override void GetNameTextDic(MyAutoCadObjectBase container, out Dictionary<string, MyText> m_jdqNameDic, out Dictionary<string, MyText> m_jdqTextDic)
        {
            m_jdqNameDic = new Dictionary<string, MyText>();
            m_jdqTextDic = new Dictionary<string, MyText>();
            MyPoint p1 = new MyPoint(1, container.Top- 4, container);
            MyText name = new MyText(p1, "电源模块");
            name.IsHorizontal = false;
            m_jdqNameDic.Add("name", name);
        }
    }
}
